<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@page import="com.mvc.security.model.Menu"%>
<%@ include file="/pages/common/header.jsp"%>
</head>
<body>
    <div class="contentBody contentborder">
        <div class="tab-pane" id="tabPane">
            <div id="message"><%=message %></div>
            <div class="tab-page" id="tabPage1">
                <div class="contentborder eXtremeTable">
                    <h3 style="margin: 5px;">应收款总帐<c:if test="${not empty suppliers}">
                                (<select id="supplier" name="supplier" style="width: 200px">
                                    <option value=""></option>
                                    <jdf:selectCollection items="suppliers" optionValue="objectId" optionText="name"/>
                                </select>
                        )</c:if></h3>
                    <table style="width: 100%;" class="tableRegion">
                        <tr>
                            <td class="tableHeader">
                                <label>货币</label>
                            </td>
                            <td class="tableHeader">
                                <label>总计</label>
                            </td>
                            <td class="tableHeader">
                                <label>本月应收</label>
                            </td>
                            <td class="tableHeader">
                                <label>下月应收</label>
                            </td>
                        </tr>
                        <tbody class="tableBody" >
                        <c:forEach varStatus="num" var="item" items="${currencies}">
                        <tr class="${num.index % 2 == 0 ? 'even' : 'odd'}"  onmouseover="this.className='highlight'"  onmouseout="this.className='${num.index % 2 == 0 ? 'even' : 'odd'}'">
                            <td>
                                ${item.name}
                            </td>
                            <td>
                                <fmt:formatNumber value="${item.remark}" pattern="#,###.###"/>
                            </td>
                            <td>
                                <fmt:formatNumber value="${item.reserver1}" pattern="#,###.###"/>
                            </td>
                            <td>
                                <fmt:formatNumber value="${item.reserver2}" pattern="#,###.###"/>
                            </td>
                        </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
    $("#supplier").bind("change",function(){
    	if($(this).val()!=""){
    		window.location.href= appRoot +'/finance/supplierReceivable/' + $(this).val();
    	}
    }).val(${supplierId});
    
    </script>
</html>